#!/bin/sh

#
# Set NTP sources online or offline depending on network status.
#

INTERFACE=$1
ACTION=$2

case "$ACTION" in
	connectivity-change)
	echo "Setting NTP source on/offline status ($ACTION $CONNECTIVITY_STATE)."
	/usr/bin/chronyc onoffline > /dev/null 2>&1 || true
	;;
	*)
	;;
esac
